From 8f1bc957c69d8d36bbfcdc0ed8eeb96c51b0ebcf Mon Sep 17 00:00:00 2001 From: robertlipe Date: Wed, 16 Oct 2013 18:15:48 +0000 Subject: [PATCH] Scratch in waypoint proximity in Garmin GPX writer. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4632 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/gpx.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gpsbabel/gpx.cc b/gpsbabel/gpx.cc index c4ee42d5e..818644105 100644 --- a/gpsbabel/gpx.cc +++ b/gpsbabel/gpx.cc @@ -1477,7 +1477,7 @@ gpx_write_common_extensions(const waypoint* waypointp, const gpx_point_type poin { // gpx version we are writing is >= 1.1. if ((opt_humminbirdext && (WAYPT_HAS(waypointp, depth) || WAYPT_HAS(waypointp, temperature))) || - (opt_garminext && gpxpt_waypoint==point_type && (WAYPT_HAS(waypointp, temperature) || WAYPT_HAS(waypointp, depth))) || + (opt_garminext && gpxpt_waypoint==point_type && (WAYPT_HAS(waypointp, proximity) || WAYPT_HAS(waypointp, temperature) || WAYPT_HAS(waypointp, depth))) || (opt_garminext && gpxpt_track==point_type && (WAYPT_HAS(waypointp, temperature) || WAYPT_HAS(waypointp, depth) || waypointp->heartrate != 0 || waypointp->cadence != 0))) { writer->writeStartElement("extensions"); @@ -1497,8 +1497,11 @@ gpx_write_common_extensions(const waypoint* waypointp, const gpx_point_type poin // Although not required by the schema we assume that gpxtpx:TrackPointExtension must be a child of gpx:trkpt. switch (point_type) { case gpxpt_waypoint: - if (WAYPT_HAS(waypointp, temperature) || WAYPT_HAS(waypointp, depth)) { + if (WAYPT_HAS(waypointp, proximity) || WAYPT_HAS(waypointp, temperature) || WAYPT_HAS(waypointp, depth)) { writer->writeStartElement("gpxx:WaypointExtension"); + if (WAYPT_HAS(waypointp, proximity)) { + writer->writeTextElement("gpxx:Proximity", toString(waypointp->proximity)); + } if (WAYPT_HAS(waypointp, temperature)) { writer->writeTextElement("gpxx:Temperature", toString(waypointp->temperature)); } -- 2.30.2